<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>

</style>

<body>
    <input type="checkbox">
    <button>
        已阅读用户协议(<span>10</span>)
    </button>
    <button class="btn1">同意</button>
    <script>
        const btn = document.querySelector("button")
        const spans = document.querySelector("span")
        const btn1 = document.querySelector('.btn1')
        const inp = document.querySelector('input')
        // console.log(spans.innerHTML);
        btn1.disabled = true
        inp.disabled = false
        let js = setInterval(function () {
            spans.innerHTML = spans.innerHTML - 1
            let num = spans.innerHTML
            if (num == 0) {
                inp.disabled = btn.disabled
                inp.checked = true
                btn1.disabled = !inp.checked
                clearInterval(js)
            }
        }, 1000)

    </script>
</body>

</html>